Object PreventExtension
samundrak
JavaScript DevThis methods helps us to prevent adding new properties to the object. Though it will not throw error in normal case but will throw error if it is used in 'use strict'. Changing value of already added property is fine and it won't throw any error.
Using preventExtension
for the object instansiated from class will still prevent the object from having new properties but new property can be added to the class and that can be access with
object which was used for preventExtension
.